package cn.webrx;

public class Op7 {

    public static void main(String[] args) {
        String a = "ok"; //0x01
        String b = new String("ok"); // 0x02 -> 0x01
        String c = new String("ok"); //0x03  -> 0x01
        System.out.println(a==b);
        System.out.println(a==c);
        System.out.println(b==c);
        System.out.println(a.equals(b));
        System.out.println(a.equals(c));
        System.out.println(b.equals(c));
        System.out.println("ok".equals(c));

        String p1 = null;
        System.out.println(p1.equals("123"));

    }


    public static void one(String[] args) {
        String a = "ok";
        String b = "ok";
        System.out.println(b);
        System.out.println(b.length());
        b+="a";
        b+="b";
        b+="c";
        b+="d";
        b+="e";
        System.out.println(b);
        System.out.println(b.length());
        System.out.println(a == b);
        System.out.println(a.equals(b));

        String str = "okab";

    }

    public static void m1(String[] args) {
        float f1 = 1.5f;
        float f2 = 1.242424299f;
        //l L 来修饰long数据类型
        //f F 来修饰float 数据类型
        //d D 来修饰double 数据类型
        Float f3 = 1f;
        System.out.println(f1);
        System.out.println(f2);
        System.out.println(f3);

    }
}
